import React, {
    Component
} from 'react';


import history from './history';//history配套路由

import {
    Router,
    Route,

} from 'react-router-dom';
import {observable,computed,autorun} from 'mobx';
import {Provider } from 'mobx-react';

import Index from './index';//首页
import Test from './test';//测试页面
import WeekCount from './../week/weekCount';//周报的统计页面
import WeekDetail from  './../week/weekDetail';//周报的详情界面


import store from './mobxStore';//引入store

class MyRoute extends Component {
    constructor(props){
        super(props);
    }
    componentWillMount =()=>{


    }

    render() {
        return (

            <Provider  {...store}>
                <Router history={history}>
                    <Route render={({location})=>{
                        return(
                            <div>
                                <Route location={location} exact path='/' component={Index} ></Route>
                                <Route location={location}  path='/weekCount' component={WeekCount} ></Route>
                                <Route location={location}  path='/WeekDetail' component={WeekDetail} ></Route>
                                <Route location={location}  path='/test' component={Test}   ></Route>
                            </div>
                        )
                    }}>

                    </Route>

                </Router>
            </Provider>



        )
    }
}

export default MyRoute;